package com.galen.manual.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.galen.manual.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserRepository extends BaseMapper<User> {

    User findByOpenid(@Param("openid") String openid);

    User findByPhone(@Param("phone") String phone);

    int updateUserLevel(@Param("userId") Long userId, @Param("level") Integer level);

    int updateUserStatus(@Param("userId") Long userId, @Param("status") Integer status);

}